package systemfnomabss


/*
 * Usage: substituteterm(value).astop.into(body)
 *
 */
trait TypeSubstitutionProvider { self: TypeSubstitutionProvider with AbstractSyntax =>

  type Name
  type partial <: typeexamplepartial
  type topsubst <: typeexamplenamesubst
  
  //def removingBinder(ty:LType):LType
  //def addingBinder(ty:LType):LType
  
  def substitutetype(v:LType):partial
  
  abstract class typeexamplepartial(v:Node) {
    def as(n:Name): topsubst
    override def toString="[? := "+v+"]"
  }
  abstract class typeexamplenamesubst(n:Name, v:Node) {
    def intotype(typ:LType):LType
    override def toString="[n := "+v+"]"
  }
}